package com.app.designpattern.designprinciples.dependencies

/**
 *
 * USER: zjw
 * DATA: 2019/4/4 0004
 * TIME: 下午 2:57
 */
class Zhangjw {
    //不考虑以领导职原则,直接新增方法
    /* fun studyJavaLanguage() {
         Log.i("dependencies", "zhangjw正在学习JavaLanguage")
     }

     fun studyPythonLanguage() {
         Log.i("dependencies", "zhangjw正在学习PythonLanguage")
     }
     */

    private var language: Language? = null

    fun setLanguage(language: Language?) {
        this.language = language
    }

    fun getStudyLanguage(language: Language?) {
        language?.studyLanguage()
    }
}